package cn.diancan.listener;


import javax.servlet.ServletContextEvent;
import javax.servlet.ServletContextListener;

import cn.diancan.config.Config;
import cn.diancan.config.SensitiveWord;


/**
 * Application Lifecycle Listener implementation class ConfigListener
 *
 */
public class ConfigListener implements ServletContextListener {

	public static String basepath;
    /**
     * Default constructor. 
     */
    public ConfigListener() { 
    }

	/**
     * @see ServletContextListener#contextInitialized(ServletContextEvent)
     */
    public void contextInitialized(ServletContextEvent event) { 
    	Config.initConfig( );//WEB-INF\classes 
    	SensitiveWord.initKeyWord();//加载过滤词库
    }

	/**
     * @see ServletContextListener#contextDestroyed(ServletContextEvent)
     */
    public void contextDestroyed(ServletContextEvent arg0) {
        // TODO Auto-generated method stub
    }
	
}
